<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2009 XBRL International. All Rights Reserved. -->
<?xml-stylesheet type="text/xsl" href="../stylesheets/conformanceFunction.xsl"?>
<testcase
  xmlns="http://xbrl.org/2008/conformance"
  xmlns:reg="http://xbrl.org/2008/registry"
  xmlns:fcn="http://xbrl.org/2008/function"
  xmlns:cfcn="http://xbrl.org/2008/conformance/function"
  xmlns:xbrli="http://www.xbrl.org/2003/instance"
  xmlns:xhtml="http://www.w3.org/1999/xhtml"
  xmlns:xff="http://www.xbrl.org/2010/function/formula"
  xmlns:xffe="http://www.xbrl.org/2010/function/formula/error"
  xmlns:xqt-err="http://www.w3.org/2005/xqt-errors"
  xmlns:concept="http://xbrl.org/formula/conformance/example" 
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xsi:schemaLocation="
  http://xbrl.org/2008/registry ../schemas/registry.xsd
  http://xbrl.org/2008/function ../schemas/function.xsd
  http://xbrl.org/2008/conformance ../schemas/conformance.xsd
  http://xbrl.org/2008/conformance/function ../schemas/conformanceFunction.xsd
  ">
  <owners>
    <reg:owner id="herm">
      <reg:name>Herm Fischer</reg:name>
      <reg:affiliation>UBMatrix / Mark V Systems</reg:affiliation>
      <reg:email>fischer@markv.com</reg:email>
     <reg:assumedOwnership moment="2009-11-19T22:00:00" />
    </reg:owner>
  </owners>

  <number>80155</number>

  <name>Function test xff:uncovered-aspect</name>

  <documentation>
    <xhtml:p>
      Tests of xff:uncovered-aspect($aspect as xs:token, $dimension as xs:QName?) as xs:anyType?
      </xhtml:p>
    <xhtml:p>
      The xff:uncovered-aspect function can only be applied to consistency assertion, value assertion,
      and formula aspect rule processing.  Hence the only result when applied in testcase use here is an
      exception, because the function testcase does not have any way to set up and execute assertions
      and formula output.
      </xhtml:p>
      <xhtml:p>
      There is a formula test case provided in this directory for that purpose,
      and it is listed as a testcase in the trunk/index.xml testcases file, to cause its execution.
      </xhtml:p>
  </documentation>

  <reference xlink:type="simple" xlink:href="http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm#_Toc152670684"/>

  <variation id="V-01">
    <name>Function raises an exception when not used in a consistency/value assertion or formula result or aspect rule expression.</name>
    <documentation>
      <xhtml:p>
      </xhtml:p>
    </documentation>

    <inputs>
      <schema xlink:type="simple" xlink:href="uncovered-aspect-tests.xsd"/>
      <instance readMeFirst="true" id="V01" xlink:type="simple" xlink:href="invalid-use-instance.xml"/>
      <cfcn:call file="V01">
         xff:uncovered-aspect( 'entity-identifier' )
      </cfcn:call>
    </inputs>
    <outputs>
      <error>xffe:invalidFunctionUse</error>
    </outputs>
  </variation>

  <variation id="V-02">
    <name>Second argument is not a QName</name>
    <documentation>
      <xhtml:p>
        XPath-defined error for type of argument.
      </xhtml:p>
    </documentation>
    <inputs>
      <schema xlink:type="simple" xlink:href="uncovered-aspect-tests.xsd"/>
      <instance readMeFirst="true" id="V02" xlink:type="simple" xlink:href="invalid-use-instance.xml"/>
      <cfcn:call file="V02">
         xff:uncovered-aspect( 'dimension', ('hello I am not a QName', 'neither am I') )
      </cfcn:call>
    </inputs>
    <outputs>
      <error>xqt-err:XPTY0004</error>
    </outputs>
  </variation>

  <revisions>
    <reg:revision on="2009-11-19T22:00:00" by="herm">
      <xhtml:p>
        Created the test case.
      </xhtml:p>
    </reg:revision>

    <reg:revision on="2009-12-13T22:00:00" by="herm">
      <xhtml:p>
        Revised prefixes and namespaces to function/formula from function/instance.
      </xhtml:p>
    </reg:revision>

    <reg:revision on="2011-08-14T12:00:00" by="herm">
      <xhtml:p>
        Fix typo in V-02 schema file.
      </xhtml:p>
    </reg:revision>
  </revisions>

</testcase>
